2025-01-31 07:04:01,142 - INFO - Num classes: 4
2025-01-31 07:06:40,637 - INFO - Class weights: tensor([ 0.3474, 11.3946,  2.2872,  1.6765], device='cuda:0')
2025-02-05 08:25:29,697 - INFO - Num classes: 4
2025-02-05 08:28:27,194 - INFO - Class weights: tensor([ 0.3474, 11.3946,  2.2872,  1.6765], device='cuda:0')
2025-02-05 08:29:53,632 - INFO - Num classes: 4
2025-02-05 08:32:46,561 - INFO - Class weights: tensor([ 0.3474, 11.3946,  2.2872,  1.6765], device='cuda:0')
2025-02-05 08:32:48,889 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1024, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(4, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(4, 4, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1024, out_features=64, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=64, out_features=1024, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1024, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=4, bias=True)
    )
    (logistic): Linear(in_features=4, out_features=4, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=8, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=4, bias=True)
  )
)
2025-02-05 08:32:48,889 - INFO - Using cuda device
2025-02-05 08:36:10,819 - INFO - Epoch: 0/100. Training time: 153.434
2025-02-05 08:36:10,856 - INFO - Training Metrics...
2025-02-05 08:36:10,856 - INFO - {'loss': 1.167685798236302, 'f1': 39.16425841744455, 'acc': 50.347914359542266, 'precision': 41.67186964989536, 'recall': 49.68429776561108, 'balanced acc': 49.68429776561108}
2025-02-05 08:36:10,856 - INFO - Validation Metrics... Inference time: 48.494
2025-02-05 08:36:10,856 - INFO - {'loss': 0.9930190443992615, 'f1': 81.24460257981657, 'acc': 87.61909795630726, 'precision': 77.44180000224819, 'recall': 87.43015372773702, 'balanced acc': 87.43015372773702}
2025-02-05 08:36:10,857 - INFO - ==================================================
2025-02-05 08:51:53,099 - INFO - Epoch: 5/100. Training time: 131.361
2025-02-05 08:51:53,130 - INFO - Training Metrics...
2025-02-05 08:51:53,130 - INFO - {'loss': 0.4458825361161005, 'f1': 64.23200304294926, 'acc': 73.3014950166113, 'precision': 62.276600186357456, 'recall': 84.1126135401882, 'balanced acc': 84.1126135401882}
2025-02-05 08:51:53,130 - INFO - Validation Metrics... Inference time: 48.400
2025-02-05 08:51:53,130 - INFO - {'loss': 0.6031217575073242, 'f1': 77.08851075014205, 'acc': 83.09390415785765, 'precision': 71.19723521134621, 'recall': 90.0524442186903, 'balanced acc': 90.0524442186903}
2025-02-05 08:51:53,130 - INFO - ==================================================
2025-02-05 09:06:33,864 - INFO - Epoch: 10/100. Training time: 130.798
2025-02-05 09:06:33,900 - INFO - Training Metrics...
2025-02-05 09:06:33,900 - INFO - {'loss': 0.3979767078445071, 'f1': 68.79294989720046, 'acc': 80.46700812107788, 'precision': 65.64704740614548, 'recall': 85.27511674210395, 'balanced acc': 85.27511674210395}
2025-02-05 09:06:33,901 - INFO - Validation Metrics... Inference time: 48.495
2025-02-05 09:06:33,901 - INFO - {'loss': 0.5087934732437134, 'f1': 79.91046830658702, 'acc': 85.88019732205777, 'precision': 74.0544109587051, 'recall': 90.96544726750854, 'balanced acc': 90.96544726750854}
2025-02-05 09:06:33,901 - INFO - ==================================================
2025-02-05 09:19:12,962 - INFO - Epoch: 15/100. Training time: 109.254
2025-02-05 09:19:13,025 - INFO - Training Metrics...
2025-02-05 09:19:13,025 - INFO - {'loss': 0.3816938598950704, 'f1': 70.28921003399495, 'acc': 82.45879475821334, 'precision': 67.04900801192765, 'recall': 86.60666853796114, 'balanced acc': 86.60666853796114}
2025-02-05 09:19:13,025 - INFO - Validation Metrics... Inference time: 38.466
2025-02-05 09:19:13,025 - INFO - {'loss': 0.4854467809200287, 'f1': 80.91195581247743, 'acc': 86.59989429175475, 'precision': 75.4036696232508, 'recall': 91.4609482889824, 'balanced acc': 91.4609482889824}
2025-02-05 09:19:13,025 - INFO - ==================================================
2025-02-05 09:30:43,613 - INFO - Epoch: 20/100. Training time: 94.775
2025-02-05 09:30:43,640 - INFO - Training Metrics...
2025-02-05 09:30:43,640 - INFO - {'loss': 0.3689779525711423, 'f1': 71.27489512211615, 'acc': 83.10714285714286, 'precision': 68.53905117476182, 'recall': 86.98028586139411, 'balanced acc': 86.98028586139411}
2025-02-05 09:30:43,640 - INFO - Validation Metrics... Inference time: 47.791
2025-02-05 09:30:43,640 - INFO - {'loss': 0.47032564878463745, 'f1': 81.3782936406941, 'acc': 86.87050739957716, 'precision': 76.09907737803465, 'recall': 91.77112210526394, 'balanced acc': 91.77112210526394}
2025-02-05 09:30:43,640 - INFO - ==================================================
2025-02-05 09:41:41,903 - INFO - Epoch: 25/100. Training time: 93.179
2025-02-05 09:41:41,917 - INFO - Training Metrics...
2025-02-05 09:41:41,917 - INFO - {'loss': 0.35244102279345196, 'f1': 72.11502928430129, 'acc': 84.13944259874494, 'precision': 69.71450634575626, 'recall': 86.81818332671521, 'balanced acc': 86.81818332671521}
2025-02-05 09:41:41,917 - INFO - Validation Metrics... Inference time: 13.710
2025-02-05 09:41:41,917 - INFO - {'loss': 0.4368889629840851, 'f1': 82.05727746849139, 'acc': 87.45049330514448, 'precision': 76.9424467354985, 'recall': 92.02869412747829, 'balanced acc': 92.02869412747829}
2025-02-05 09:41:41,917 - INFO - ==================================================
2025-02-05 09:53:56,970 - INFO - Epoch: 30/100. Training time: 98.822
2025-02-05 09:53:57,023 - INFO - Training Metrics...
2025-02-05 09:53:57,023 - INFO - {'loss': 0.35653781039374216, 'f1': 71.0031743846834, 'acc': 83.15250092284975, 'precision': 68.84269876226986, 'recall': 86.05449502164316, 'balanced acc': 86.05449502164316}
2025-02-05 09:53:57,023 - INFO - Validation Metrics... Inference time: 45.725
2025-02-05 09:53:57,023 - INFO - {'loss': 0.414916068315506, 'f1': 82.09764130782771, 'acc': 87.62403100775192, 'precision': 76.97097914024522, 'recall': 91.94101201694383, 'balanced acc': 91.94101201694383}
2025-02-05 09:53:57,023 - INFO - ==================================================
2025-02-05 10:05:11,207 - INFO - Epoch: 35/100. Training time: 108.932
2025-02-05 10:05:11,238 - INFO - Training Metrics...
2025-02-05 10:05:11,238 - INFO - {'loss': 0.362049427770433, 'f1': 71.16778501815652, 'acc': 83.22323735695828, 'precision': 68.2999212839217, 'recall': 86.40397058254082, 'balanced acc': 86.40397058254082}
2025-02-05 10:05:11,238 - INFO - Validation Metrics... Inference time: 36.310
2025-02-05 10:05:11,238 - INFO - {'loss': 0.40913528203964233, 'f1': 82.142447412182, 'acc': 87.60887949260042, 'precision': 77.06307754480046, 'recall': 92.0031345911667, 'balanced acc': 92.0031345911667}
2025-02-05 10:05:11,238 - INFO - ==================================================
2025-02-05 10:16:14,962 - INFO - Epoch: 40/100. Training time: 102.853
2025-02-05 10:16:15,034 - INFO - Training Metrics...
2025-02-05 10:16:15,034 - INFO - {'loss': 0.3387271435487838, 'f1': 72.63571309599082, 'acc': 84.05435585086748, 'precision': 69.99631395026357, 'recall': 87.72994823574184, 'balanced acc': 87.72994823574184}
2025-02-05 10:16:15,034 - INFO - Validation Metrics... Inference time: 25.646
2025-02-05 10:16:15,034 - INFO - {'loss': 0.40628278255462646, 'f1': 82.10785765908308, 'acc': 87.61381254404509, 'precision': 77.11623021358206, 'recall': 91.93494285683438, 'balanced acc': 91.93494285683438}
2025-02-05 10:16:15,034 - INFO - ==================================================
2025-02-05 10:26:47,489 - INFO - Epoch: 45/100. Training time: 103.931
2025-02-05 10:26:47,543 - INFO - Training Metrics...
2025-02-05 10:26:47,544 - INFO - {'loss': 0.3450806637605031, 'f1': 71.67523375328241, 'acc': 83.42870985603543, 'precision': 69.2186987728738, 'recall': 86.4378047584629, 'balanced acc': 86.4378047584629}
2025-02-05 10:26:47,544 - INFO - Validation Metrics... Inference time: 12.185
2025-02-05 10:26:47,544 - INFO - {'loss': 0.4075959324836731, 'f1': 82.09482443375772, 'acc': 87.5329457364341, 'precision': 77.03934122664336, 'recall': 92.0451379453781, 'balanced acc': 92.0451379453781}
2025-02-05 10:26:47,544 - INFO - ==================================================
2025-02-05 10:37:26,321 - INFO - Epoch: 50/100. Training time: 115.113
2025-02-05 10:37:26,380 - INFO - Training Metrics...
2025-02-05 10:37:26,380 - INFO - {'loss': 0.38702057231040227, 'f1': 69.80636589342072, 'acc': 81.73375784422296, 'precision': 67.00408876387444, 'recall': 86.36871233281121, 'balanced acc': 86.36871233281121}
2025-02-05 10:37:26,380 - INFO - Validation Metrics... Inference time: 20.161
2025-02-05 10:37:26,380 - INFO - {'loss': 0.4033021032810211, 'f1': 82.16830223332259, 'acc': 87.67635658914729, 'precision': 77.20029179485311, 'recall': 91.87799787471745, 'balanced acc': 91.87799787471745}
2025-02-05 10:37:26,381 - INFO - ==================================================
2025-02-05 10:47:42,252 - INFO - Epoch: 55/100. Training time: 79.248
2025-02-05 10:47:42,275 - INFO - Training Metrics...
2025-02-05 10:47:42,275 - INFO - {'loss': 0.3412201319422041, 'f1': 71.841625572522, 'acc': 84.93553894425987, 'precision': 69.40738151294086, 'recall': 86.03796016151851, 'balanced acc': 86.03796016151851}
2025-02-05 10:47:42,275 - INFO - Validation Metrics... Inference time: 25.868
2025-02-05 10:47:42,275 - INFO - {'loss': 0.3869355320930481, 'f1': 82.48707647839241, 'acc': 87.95630725863283, 'precision': 77.48520848205658, 'recall': 92.02671256641186, 'balanced acc': 92.02671256641186}
2025-02-05 10:47:42,275 - INFO - ==================================================
2025-02-05 10:58:13,686 - INFO - Epoch: 60/100. Training time: 96.328
2025-02-05 10:58:13,723 - INFO - Training Metrics...
2025-02-05 10:58:13,723 - INFO - {'loss': 0.3551462647460756, 'f1': 71.79031633271526, 'acc': 83.4907253599114, 'precision': 69.27665851842991, 'recall': 86.6845323882561, 'balanced acc': 86.6845323882561}
2025-02-05 10:58:13,723 - INFO - Validation Metrics... Inference time: 25.668
2025-02-05 10:58:13,723 - INFO - {'loss': 0.39301797747612, 'f1': 82.34149577128154, 'acc': 87.80708245243129, 'precision': 77.25188419703268, 'recall': 92.04078210749198, 'balanced acc': 92.04078210749198}
2025-02-05 10:58:13,724 - INFO - ==================================================
2025-02-05 11:07:25,878 - INFO - Epoch: 65/100. Training time: 87.003
2025-02-05 11:07:25,923 - INFO - Training Metrics...
2025-02-05 11:07:25,923 - INFO - {'loss': 0.35457846948078703, 'f1': 71.18561938148912, 'acc': 83.2669804355851, 'precision': 68.81265988482207, 'recall': 86.0092965665631, 'balanced acc': 86.0092965665631}
2025-02-05 11:07:25,923 - INFO - Validation Metrics... Inference time: 8.366
2025-02-05 11:07:25,923 - INFO - {'loss': 0.4011419713497162, 'f1': 82.14799650680409, 'acc': 87.59443269908385, 'precision': 77.11990959738547, 'recall': 91.9901607233763, 'balanced acc': 91.9901607233763}
2025-02-05 11:07:25,923 - INFO - ==================================================
2025-02-05 11:18:11,549 - INFO - Epoch: 70/100. Training time: 89.605
2025-02-05 11:18:11,622 - INFO - Training Metrics...
2025-02-05 11:18:11,622 - INFO - {'loss': 0.341564063514982, 'f1': 71.82446105863276, 'acc': 84.75115356220006, 'precision': 69.63982714218388, 'recall': 86.21869184918587, 'balanced acc': 86.21869184918587}
2025-02-05 11:18:11,622 - INFO - Validation Metrics... Inference time: 33.397
2025-02-05 11:18:11,622 - INFO - {'loss': 0.38551947474479675, 'f1': 82.53412240117218, 'acc': 88.01180408738549, 'precision': 77.50670114333963, 'recall': 92.03521558324361, 'balanced acc': 92.03521558324361}
2025-02-05 11:18:11,622 - INFO - ==================================================
2025-02-05 11:28:50,663 - INFO - Epoch: 75/100. Training time: 99.379
2025-02-05 11:28:50,695 - INFO - Training Metrics...
2025-02-05 11:28:50,695 - INFO - {'loss': 0.3429203970091684, 'f1': 72.34662629799034, 'acc': 85.30740125507566, 'precision': 69.82423439198145, 'recall': 86.21340955309462, 'balanced acc': 86.21340955309462}
2025-02-05 11:28:50,695 - INFO - Validation Metrics... Inference time: 39.567
2025-02-05 11:28:50,696 - INFO - {'loss': 0.39390990138053894, 'f1': 82.30320556860238, 'acc': 87.76814658210007, 'precision': 77.35144867231777, 'recall': 91.95306101624901, 'balanced acc': 91.95306101624901}
2025-02-05 11:28:50,696 - INFO - ==================================================
2025-02-05 11:39:38,501 - INFO - Epoch: 80/100. Training time: 82.504
2025-02-05 11:39:38,528 - INFO - Training Metrics...
2025-02-05 11:39:38,528 - INFO - {'loss': 0.3326474740391686, 'f1': 72.0844118681944, 'acc': 84.66048357327426, 'precision': 69.75605955801024, 'recall': 86.01752340205134, 'balanced acc': 86.01752340205134}
2025-02-05 11:39:38,528 - INFO - Validation Metrics... Inference time: 39.529
2025-02-05 11:39:38,528 - INFO - {'loss': 0.397075891494751, 'f1': 82.18330028224622, 'acc': 87.67159971811135, 'precision': 77.21073977633614, 'recall': 91.92540809798001, 'balanced acc': 91.92540809798001}
2025-02-05 11:39:38,528 - INFO - ==================================================
2025-02-05 11:39:38,528 - INFO - Early stopping criterion met. Stopping training.
2025-02-05 11:39:54,419 - INFO - Final test metrics:
{'f1': 82.67177043646224, 'acc': 88.14358703312192, 'precision': 77.57379052346711, 'recall': 92.10580952688964, 'balanced acc': 92.10580952688964}
